<?php

namespace app\mall\event\subscribes;

use app\admin\logic\system\Log;
use think\Event;

class Address
{
    public function subscribe(Event $event)
    {
        $admin = '管理员【' . request()->user->user_name . '/' . request()->user->id . '】';

        /** 新建 */
        $event->listen('AfterDelete', function ($data) use ($admin) {
            Log::write($admin . '删除了地址:ID:' . $data->id, 'address', 'delete');
        });

    }
}
